return gtk_css_style_get_section (animated->style, id);
}
-static GtkBitmask *
-gtk_css_animated_style_compute_dependencies (GtkCssStyle *style,
- const GtkBitmask *parent_changes)
-{
- GtkCssAnimatedStyle *animated = GTK_CSS_ANIMATED_STYLE (style);
-
- /* XXX: This misses dependencies due to animations */
- return gtk_css_style_compute_dependencies (animated->style, parent_changes);
-}
-
static void
gtk_css_animated_style_dispose (GObject *object)
{
style_class->get_value = gtk_css_animated_style_get_value;
style_class->get_section = gtk_css_animated_style_get_section;
- style_class->compute_dependencies = gtk_css_animated_style_compute_dependencies;
}
static void
return g_ptr_array_index (sstyle->sections, id);
}
+/* Compute the bitmask of potentially changed properties if the parent has changed
+ * the passed in ones.
+ * This is for example needed when changes in the "color" property will affect
+ * all properties using "currentColor" as a color.
+ */
static GtkBitmask *
-gtk_css_static_style_compute_dependencies (GtkCssStyle *style,
- const GtkBitmask *parent_changes)
+gtk_css_static_style_compute_dependencies (GtkCssStaticStyle *style,
+ const GtkBitmask *parent_changes)
{
GtkCssStaticStyle *sstyle = GTK_CSS_STATIC_STYLE (style);
GtkBitmask *changes;
style_class->get_value = gtk_css_static_style_get_value;
style_class->get_section = gtk_css_static_style_get_section;
- style_class->compute_dependencies = gtk_css_static_style_compute_dependencies;
}
static void
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
gtk_internal_return_val_if_fail (matcher != NULL, NULL);
- changes = gtk_css_style_compute_dependencies (GTK_CSS_STYLE (style), parent_changes);
+ changes = gtk_css_static_style_compute_dependencies (style, parent_changes);
if (_gtk_bitmask_is_empty (changes))
{
_gtk_bitmask_free (changes);
return NULL;
}
-static GtkBitmask *
-gtk_css_style_real_compute_dependencies (GtkCssStyle *style,
- const GtkBitmask *parent_changes)
-{
- return _gtk_bitmask_copy (parent_changes);
-}
-
static void
gtk_css_style_class_init (GtkCssStyleClass *klass)
{
klass->get_section = gtk_css_style_real_get_section;
- klass->compute_dependencies = gtk_css_style_real_compute_dependencies;
}
static void
return result;
}
-GtkBitmask *
-gtk_css_style_compute_dependencies (GtkCssStyle *style,
- const GtkBitmask *parent_changes)
-{
- gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (style), _gtk_bitmask_new ());
-
- return GTK_CSS_STYLE_GET_CLASS (style)->compute_dependencies (style, parent_changes);
-}
-
void
gtk_css_style_print (GtkCssStyle *style,
GString *string)
* Optional: default impl will just return NULL */
GtkCssSection * (* get_section) (GtkCssStyle *style,
guint id);
- /* Compute the bitmask of potentially changed properties if the parent has changed
- * the passed in ones.
- * This is for example needed when changes in the "color" property will affect
- * all properties using "currentColor" as a color.
- * Optional: The default impl just returns the parent changes unchanged */
- GtkBitmask * (* compute_dependencies) (GtkCssStyle *style,
- const GtkBitmask *parent_changes);
};
GType gtk_css_style_get_type (void) G_GNUC_CONST;
guint id);
GtkBitmask * gtk_css_style_get_difference (GtkCssStyle *style,
GtkCssStyle *other);
-GtkBitmask * gtk_css_style_compute_dependencies (GtkCssStyle *style,
- const GtkBitmask *parent_changes);
char * gtk_css_style_to_string (GtkCssStyle *style);
void gtk_css_style_print (GtkCssStyle *style,